# Contributor: jane400 <ralfrachinger@gmail.com>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=plasmatube
pkgver=23.08.4
pkgrel=0
pkgdesc="Kirigami YouTube video player based on Invidious"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://invent.kde.org/plasma-mobile/plasmatube"
license="GPL-3.0-or-later AND CC0-1.0"
depends="
	gst-libav
	gst-plugins-good
	gst-plugins-good-qt
	kcoreaddons5
	kdeclarative5
	kirigami2
	qt5-qtimageformats
	qt5-qtquickcontrols2
	yt-dlp
	"
makedepends="
	extra-cmake-modules
	ki18n5-dev
	kirigami2-dev
	mpv-dev
	qt5-qtbase-dev
	qt5-qtquickcontrols2-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/multimedia/plasmatube.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/plasmatube-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3a363f88f884b33ba40e2b31fa0b50be37f4ff6534e9063b539e0ba61d733dccf7440d73846245256ae13513839fe126c52f68461e754d5ea50ef0918b272f9c  plasmatube-23.08.4.tar.xz
"
